Class Objects.Material
Represents a material instance for the texture.
To be used with Objects.GetMaterialByName and Objects.GetMaterialsByObject. Materials are managed in the Tomb Editor's material window. This class is not in any way related to Collision.FloorMaterialType. Name and type setters are not implemented for safety reasons due to low-level nature of the material system.
Functions
| Material:GetName() | Get this material's unique string identifier. |
| Material:GetType() | Get texture material type of this material. |
| Material:GetProperty(name) | Get a material property value. |
| Material:SetProperty(name, value) | Set a material property value. |
| Material:ResetProperty(name) | Reset a material property to its default value. |
| Material:IsPropertyPresent(name) | Check if this material type has a property with the given name. |
Functions
- Material:GetName()
-
Get this material's unique string identifier.
Returns:
-
string
Name string.
- Material:GetType()
-
Get texture material type of this material.
Returns:
-
TextureMaterialType
Texture material type.
- Material:GetProperty(name)
-
Get a material property value.
Property can be addressed by its name or zero-based slot index.
Parameters:
- name string Property name.
Returns:
- Material:SetProperty(name, value)
-
Set a material property value.
Property can be addressed by its name or zero-based slot index.
Parameters:
- Material:ResetProperty(name)
-
Reset a material property to its default value.
Property can be addressed by its name or zero-based slot index.
Parameters:
- name string Property name.
- Material:IsPropertyPresent(name)
-
Check if this material type has a property with the given name.
Parameters:
- name string Property name.
Returns:
-
bool
True if the property with a given name exists for this material.
